259 REM C64D-4VM : CEK 260 POKE56,33:POKE644,33:CLR:Y=PEEK(45)+256*PEEK(46)-943:SYSY:DEFFNC(I)=9472+I*64 270 PRINTCHR$(142)CHR$(8)"[147] 4-VOICE MUSIC (C64) 280 [153]"1PLAY 2COMPOSE 3LOAD":[153]"4SAVE 5VERIFY 6TITLE 290 Z=9216:INPUT"7TUNE 8WAVEFORM";B:ONBGOTO970,300,900,910,920,500,980,550:END 300 B=0:INPUT"1BAR 2SONG 3COPY";B:ONBGOTO310,800,700:RUN 310 N=-1:INPUT"BAR #";N:IFN<0ORN>239THEN300 320 B=0:INPUT"1PLAY 2CLEAR 3EDIT";B:ONBGOTO330,340,350:GOTO310 330 POKE8960,N:POKE253,0:POKE254,0:GOSUB600:SYSY+504:GOTO320 340 A$="":INPUT"SURE";A$:IFA$="Y"THENFORI=FNC(N)TOI+63:POKEI,0:NEXT:POKEZ+N,240 350 H$=" STEP ONN ONN ONN ONN[146] 360 [153]"LOAD"H$:[129]I[178]1[164]16:[153]I:[130] 365 [153]"":[151]254,N:[158]Y[170]139:[153]"CMD"H$:[153]" BAR TIME LAST 370 PRINTNTAB(7)PEEK(252)TAB(15)PEEK(251):PRINT"GOTO400";:H$="":END 400 S=1070:PRINT"[145] ":L=FNC(N):FORI=0TO15:K=S+I*40:J=252:GOSUB650 410 POKE2,0:SYSY+306:ONPEEK(2)GOTO440:K=L+4*I+4:J=254:GOSUB650:NEXT 420 K=1792:GOSUB680:I=M:IFI>12THENPRINT"TIME ERROR":I=0 430 K=K+8:GOSUB680:POKEZ+N,16*M+I-16:GOTO320 440 K=L:J=254:GOSUB650:PRINT"[145]ERROR IN"I+1;:INPUT"OK";A$:PRINT"[145]GOTO400 ";:END 500 H$="FROM,TO,TITLE":PRINTH$:PRINTPEEK(9470)","PEEK(9471); 503 FORI=9469TO9456STEP-1:J=PEEK(I):IFJ<32ORJ>127THENJ=63 505 PRINTCHR$(J);:NEXT:PRINT:A$="":INPUT"OK";A$:IFA$<>"N"THENRUN 510 PRINTH$:INPUTA,B,A$:IFLEN(A$)>14THENA$=LEFT$(A$,14) 515 IFLEN(A$)<14THENA$=A$+LEFT$(" ",14-LEN(A$)) 520 POKE9470,A:POKE9471,B:FORI=1TO14:POKE9455+I,ASC(MID$(A$,15-I,1)):NEXT:RUN 550 PRINT"1SINE 2TRIANGLE":INPUT"3RAMP 4SQUARE";I:ONIGOTO560,570,580,590:RUN 560 PRINT"WAIT...":FORI=0TO255:POKE8448+I,32+31.9*SIN(I/128*(null)):NEXT:RUN 570 FORI=0TO127:POKE8448+I,I/2:POKE8703-I,I/2:NEXT:RUN 580 FORI=0TO255:POKE8448+I,I/4:NEXT:RUN 590 FORI=8448TO8575:POKEI,0:POKEI+128,63:NEXT:RUN 600 INPUT"B.P.M.";K:K=K*8.35:J=242 650 POKEJ,K/256:POKEJ-1,K-256*PEEK(J):RETURN 680 M=PEEK(K)-48:L=PEEK(K+1)-48:IFL>=0THENM=M*10+L:L=PEEK(K+2)-48:IFL>=0THENM=M*10+L 690 RETURN 700 INPUT"BARS:FROM,TO";A,N:IFA<0ORA>239ORN<0ORN>239THEN700 710 M=0:PRINT"TRANPOSITION IN":INPUT"HALF STEPS";M 720 A$="":INPUT"SURE";A$:ON-(A$<>"Y")GOTO300:POKEZ+N,PEEK(Z+A):A=FNC(A):B=FNC(N) 730 FORI=0TO63:J=PEEK(A+I):K=JAND128:L=JAND127:IFLTHENL=L+M 740 POKEB+I,K+(LAND127):NEXT:GOTO350 800 N=8960:A=-1:B=-3:C=0:PRINT"1SHOW 2DELETE 3INSERT":INPUTC:ONCGOTO806,801,820:GOTO300 801 INPUT"FROM,TO";A,B:IFA>BORA<0ORA>254ORB<1ORB>255GOTO800 802 A$="":INPUT"SURE";A$:IFA$<>"Y"THEN800 803 FORI=ATO255:C=I+N+B-A+1:POKEI+N,PEEK(C):IFC>=ZTHENPOKEI+N,0 804 NEXT:GOTO800 806 H$="[166][166][166][166] [162][162][162] [162][162][162] [162][162][162] [162][162][162]":A=-1:INPUT"AT BAR";A:IFA<0ORA>255THEN300 807 PRINT"[147]"H$:B=A+63:IFA>192THENA=AAND252:B=255 808 FORI=ATOBSTEP4:PRINTI;:FORJ=0TO3:PRINTTAB(5+J*5)PEEK(N+I+J);:NEXT:PRINT:NEXT 809 PRINTH$:H$="":PRINT"GOTO810":S=1070:END 810 FORI=0TO(B-A)STEP4:FORJ=0TO3:K=S+5*J:GOSUB680:POKEN+A+I+J,M:NEXT 815 S=S+40:NEXT:PRINT:GOTO800 820 A=-1:B=-3:INPUT"AFTER BAR, #";A,B:IFA<0ORA>254ORB<0ORA+B>255GOTO800 821 A$="":INPUT"SURE";A$:IFA$<>"Y"THEN800 822 FORI=255TOA+BSTEP-1:POKEN+I,PEEK(N+I-B):NEXT:FORI=A+1TOA+B:POKEI+N,0:NEXT:GOTO800 900 A$="LOAD":D$="":GOTO930 910 A$="SAVE":D$="":INPUT"MAX. BAR #";I:GOTO930 920 A$="VERIFY":D$="" 930 INPUT"NAME";M$:PRINT"[147]";:IFB=4THENPRINT"P[207]43,0:P[207]44,35:P[207]45,0:P[207]46,"I/4+38 940 PRINT""A$CHR$(34)M$CHR$(34)",8,1"D$:FORI=631TO638:POKEI,13:NEXT:POKE198,8 950 PRINT"P[207]43,1:P[207]44,8:P[207]45,"PEEK(45)":P[207]46,"PEEK(46)":RUN960";:END 960 FORI=1TO8:GETM$:NEXT:INPUT"(HIT RETURN)";M$:RUN 970 INPUT"FROM,TO";A,B:IFA>BTHEN300 975 GOSUB600:POKE253,A:POKE254,B:SYSY+504:RUN 980 K=171:Z=2^(1/12):POKE8704,0:POKE8705,0:FORJ=8707TO8897STEP2:GOSUB650:K=K*Z:NEXT:RUN